package com.learn.criminalintent

import androidx.lifecycle.ViewModel
import java.util.UUID

class CrimeListViewModel : ViewModel() {

    private val crimeRepository = CrimeRepository.get()

    // 从数据库中查询所有的Crime对象
    val crimeListLiveData = crimeRepository.getCrimes()

    fun addCrime(crime: Crime) {
        crimeRepository.addCrime(crime)
    }
}